<template>
    <div class="con">
        <div class="header">
          <van-nav-bar title="今日特价" left-text="返回"  right-text="分享" left-arrow class="spec" @click-left='tab()' @click-right='share()'>
           <van-icon name="cluster-o" slot="right" />
            </van-nav-bar>
            <van-action-sheet v-model="show1" title="分享到" height:30>
                <div class="share">
                    <share :config='config'></share>
                </div>
            </van-action-sheet>
      </div>
      <main>
          <van-swipe :loop="false" >
            <van-swipe-item v-for="(item,i) in 4" :key='i'>1</van-swipe-item>
            
          </van-swipe>
        
      </main>
    </div>
</template>

<script>

export default {
    name:'Bargain',
    methods:{
        tab(){
            this.$router.go(-1)
        },
        tab4(){
            this.show=true
        },
         share(){
            this.show1=true
        }
    }
    ,
     data(){
    return {
      show: false,
      show1:false,
      list:[],
      actions: [
        { name: '选项' },
        { name: '选项' },
        { name: '选项', subname: '描述信息' }
      ],
       config:{
                url: 'http://www.baidu.com', // 网址，默认使用 window.location.href
		source:'', // 来源（QQ空间会用到）, 默认读取head标签：<meta name="site" content="http://overtrue" />
		title: 'hello', // 标题，默认读取 document.title 或者 <meta name="title" content="share.js" />
		description: 'hi', // 描述, 默认读取head标签<meta name="description" content="PHP弱类型的实现原理分析" />
		image : '', // 图片, 默认取网页中第一个img标签
		sites: ['qq', 'weibo','qzone' ,], // 启用的站点
		wechatQrcodeTitle: '微信扫一扫：分享', // 微信二维码提示文字
		wechatQrcodeHelper  : '<p>微信里点“发现”，扫一下</p><p>二维码便可将本文分享至朋友圈。</p>'

            }
    };
}
}
</script>

<style scoped>
.social-share{
    display: flex;
    justify-content: space-between;
    padding: 0 38px
}
.share{
    height: 100px;
}
.con{
    height: 100vh;
    display: flex;
    flex-direction: column;

}
.van-nav-bar__text{
    color: #000
}
.van-nav-bar .van-icon{
    color: #333;
    margin-top: 3px
}
.van-nav-bar__title{
    font-size: 15px
}
main{
    flex: 1;
    overflow: auto;
    background:#ffd27f
}
.van-swipe{
     height: 180px;
}
main .an-swipe-item{
    height: 180px;
    width: 200px;
    background: red
}
.van-swipe .van-swipe-item:first-of-type{
   background: red;
   position: relative;
  
}
.van-swipe{
    margin-top: 200px
}
.van-swipe .van-swipe-item:nth-of-type(2){
   background: yellow;
    position: relative;
}
.van-swipe .van-swipe-item:nth-of-type(3){
   background: silver;
    position: relative;
}
.van-swipe .van-swipe-item:nth-of-type(4){
   background: cyan;
    position: relative;
}
</style>